<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>欢迎登录</title>
    <script src="lib/jquery/jquery-3.4.1.min.js"></script>
    <script>
        let userEmail = null;
        $.ajax({
            url: "http://192.168.32.102/api/user/info",
            type: "GET",
            async: false,
            success: function (result) {
                console.log(typeof result)
                if (result.split("@").length > 1) {
                    userEmail = result;
                } else {
                    window.location.href = "http://192.168.32.102/static/login.html";
                }
            }
        });
    </script>
</head>
<body>
<div>
    <h1>
        <span class="userEmail">xxxxxxxxxx@qq.com</span>欢迎登录系统
    </h1>

    <script>
        $(".userEmail").empty().text(userEmail);
    </script>
</div>
</body>
</html>